import request from '@/utils/request'

// 获取用户验证码
export const getUserCode = () => {
  return request ({
    method: 'GET',
    url: `/verify_code`
  })
}
// 获取短信验证码  /register/verify
export const getMsgCode = data => {
  return request ({
    method: 'POST',
    url: `/register/verify`,
    data
  })
}
// 密码登录请求  
export const loginByPassword = data => {
  return request ({
    method: 'POST',
    url: `/login`,
    data
  })
}
// 验证码登录请求  
export const loginByMobile = data => {
  return request ({
    method: 'POST',
    url: '/login/mobile',
    data
  })
}
// 获取用户页信息
export const getUserInfo = () =>{
  return request ({
    method: 'GET',
    url: '/user'
  })
}